import Layout from '@/layout'

const settingRouter = {
  path: '/setting',
  component: Layout,
  redirect: '/setting/system_set',
  name: 'Setting',
  meta: {
    title: '系统设置',
    icon: 'set'
  },
  children: [
    {
      path: 'system_set',
      name: 'SystemSet',
      component: () => import('@/views/setting/set/system'),
      meta: { title: '系统主页', noCache: true }
    },
    {
      path: 'basic-set',
      name: 'BasicSet',
      // component: () => import('@/views/setting/index'),
      component: () => import('@/views/integral/index.vue'),
      redirect: '/setting/basic-set/basic-set-page',
      meta: { title: '基本设置' },
      children: [
        {
          path: 'basic-set-page',
          name: 'BasicSetPage',
          hidden: true,
          component: () => import('@/views/setting/set/basic'),
          meta: { title: '基本设置' }
        },
        {
          path: 'add-email',
          name: 'AddEmail',
          hidden: true,
          component: () => import('@/views/setting/set/addEmail'),
          meta: { title: '添加邮箱', noCache: true }
        },
        {
          path: 'edit-email',
          name: 'EditEmail',
          hidden: true,
          component: () => import('@/views/setting/set/addEmail'),
          meta: { title: '编辑邮箱', noCache: true }
        }
      ]
    },
    {
      path: 'agreement_set',
      name: 'AgreementSet',
      component: () => import('@/views/setting/set/agreement'),
      meta: { title: '协议设置', noCache: true }
    },
    {
      path: 'deal_set',
      name: 'DealSet',
      component: () => import('@/views/setting/set/deal'),
      meta: { title: '交易设置', noCache: true }
    },
    {
      path: 'help_center',
      name: 'HelpCenter',
      component: () => import('@/views/setting/index'),
      redirect: '/setting/help_center/help_list',
      meta: { title: '帮助中心', noCache: true },
      children: [
        {
          path: 'help_list',
          name: 'HelpList',
          meta: { title: '帮助中心', noCache: true },
          component: () => import('@/views/setting/help-center/list')
        },
        {
          path: 'add_content',
          name: 'AddContent',
          hidden: true,
          component: () => import('@/views/setting/help-center/add'),
          meta: { title: '新建内容', noCache: true }
        },
        {
          path: 'edit_content',
          name: 'EditContent',
          hidden: true,
          component: () => import('@/views/setting/help-center/add'),
          meta: { title: '编辑内容', noCache: true }
        },
        {
          path: 'add_detail',
          name: 'AddDetail',
          hidden: true,
          component: () => import('@/views/setting/help-center/add'),
          meta: { title: '查看详情', noCache: true }
        }
      ]
    },
    {
      path: 'system_admin',
      name: 'SystemAdmin',
      component: () => import('@/views/setting/index'),
      redirect: '/setting/system_admin/admin_list',
      meta: { title: '系统管理员', noCache: true },
      children: [
        {
          path: 'admin_list',
          name: 'AdminList',
          component: () => import('@/views/setting/admin/list'),
          meta: { title: '系统管理员', noCache: true }
        },
        {
          path: 'add_admin',
          name: 'AddAdmin',
          hidden: true,
          component: () => import('@/views/setting/admin/add'),
          meta: { title: '添加管理员', noCache: true }
        },
        {
          path: 'edit_admin',
          name: 'EditAdmin',
          hidden: true,
          component: () => import('@/views/setting/admin/add'),
          meta: { title: '编辑管理员', noCache: true }
        }
      ]
    }
  ]
}

export default settingRouter
